package com.wangp.springbootsource.ioc.ann;

import com.wangp.springbootsource.ioc.entity.Animal;
import com.wangp.springbootsource.ioc.entity.Cat;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * <pre>
 * classname MyCat
 * description
 * </pre>
 *
 * @author wangp
 * @date 2020/9/18 19:33
 **/
@Component
public class MyCat implements FactoryBean<Animal> {

    @Override
    public Animal getObject() throws Exception {
        return new Cat();
    }

    @Override
    public Class<?> getObjectType() {
        return Animal.class;
    }
}
